<div class="card mt-3">
    {% if user.is_authenticated %}
    <div class="card-body">
        <div id="reply-to-info" class="alert alert-info mb-3 d-none">
            @<span id="reply-to-user"></span>
            <button id="cancel-reply" class="btn btn-sm btn-link">取消</button>
        </div>
        <form method="post">
            {% csrf_token %}
            <input type="hidden" name="reply_to_id" id="reply-to-id">
            <div class="mb-3">
                {{ comment_form.content }}
            </div>
            <div class="d-flex justify-content-end">
                <button class="btn btn-secondary" type="submit">提交评论</button>
            </div>
        </form>
    </div>
    {% else %}
    <div class="card-body text-center">
        您尚未登录
        <a href="{% url 'account_login' %}?next={{ request.path }}">登录</a> 或
        <a href="{% url 'account_signup' %}?next={{ request.path }}">注册</a> 以发表评论。
    </div>
    {% endif %}
</div>